update e2c 5

Documentation Version for Comments and Changes

You are invited to make any changes...add any comments.

Changes will `eventually` be merged into the offical documentation.

Leave any commnents here...

...

... back to index page OE documentation



The resulting output can be compiled by the appropriate compiler on the specified platform, or, possibly a cross platform compiler, if you have one configured.

-rc-file - Resource File

On Windows, euc can automatically compile and link in an application specific resource file. This resource file can contain product and version information, an application icon or any other valid resource data.

euc -rc-file myapp.rc myapp.ex 

The resulting executable will contain all the resources from myapp.rc compiled into the executable. Please see Using Resource Files.

-silent

Do not display status messages.

-stack - Stack size

To increase or decrease the total amount of stack space reserved for your program, add -stack nnnn to the command line. e.g.

euc -stack 100000 myprog.ex 

The total stack space (in bytes) that you specify will be divided up among all the tasks that you have running (assuming you have more than one). Each task has it's own private stack space. If it exceeds its allotment, you'll get a run-time error message identifying the task and giving the size of its stack space. Most non-recursive tasks can run with call stacks as small as 2000 bytes, but to be safe, you should allow more than this. A deeply-recursive task could use a great deal of space. It all depends on the maximum levels of calls that a task might need. At run-time, as your program creates more simultaneously-active tasks, the stack space allotted to each task will tend to decrease.

Dynamic Link Libraries

Simply by adding -dll (or -so) to the command line, the Translator will build a shared dynamically loading library instead of an executable program.

You can translate and compile a set of useful Euphoria routines, and share them with other people, without giving them your source. Furthermore, your routines will likely run much faster when translated and compiled. Both translated/compiled and interpreted programs will be able to use your library.

Only the global Euphoria procedures and functions, i.e. those declared with the "global", "public" or "export" keyword, will be exported from the shared dynamically loaded library.

Any Euphoria program, whether translated or compiled or interpreted, can link with a Euphoria shared dynamically loading library using the same mechanism that lets you link with a shared dynamically loading library written in C. The program first calls open_dll to open the file, then it calls define_c_func or define_c_proc for any routines that it wants to call. It calls these routines using c_func and c_proc.

The routine names exported from a Euphoria shared dynamically loading library will vary depending on which C compiler you use.

GNU C on Unix exports the names exactly as they appear in the C code produced by the Translator, e.g. a Euphoria routine

{{{

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu